import 'package:flutter/material.dart';
import 'package:moose_app/ui/values/values.dart';

import 'util.dart';

class ATHChatAvatar extends StatelessWidget {
  final String avatarName;

  ATHChatAvatar({this.avatarName});

  @override
  Widget build(BuildContext context) {
    return _buildAvatar();
  }

  Widget _buildAvatar() {
    return ClipRRect(
      borderRadius: BorderRadius.circular(kSize10),
      child: Container(
        width: kSize80,
        height: kSize80,
        alignment: Alignment.center,
        color: kColorPrimary,
        child: Text(
          geneChatName(avatarName ?? ""),
          overflow: TextOverflow.ellipsis,
          maxLines: 1,
          style: TextStyle(
            color: Colors.white,
            fontSize: kFontSize28,
          ),
        ),
      ),
    );
  }
}
